1. Field of the Invention
The present invention relates to a data processing system, and in particular, to a method for restarting an execution of an instruction interrupted due to a page fault which has occurred during the execution of the instruction.
In a data processing system using an on-demand paging system, a page for which a memory access is attempted may be missing in the main memory in some cases. This condition is called a page fault. When a page fault occurs, the pertinent page must be first loaded from an external storage into the main memory and then the access must be initiated again.
Two kinds of memory accesses are available, namely, an instruction read and an operand read/write. The latter is accomplished while an instruction is being executed, and hence the content of an internal register or the main memory may have possibly been altered before the access that has caused the page fault. To overcome this difficulty, a special processing is necessary in a case where the load processing is executed for the reexecution of the instruction after an occurrence of a page fault.
The methods for restarting the execution of an instruction interrupted due to a page fault include a method for reexecuting the instruction from the beginning as described in the JP-A-52-86741 and a method for reexecuting the instruction from the interruption point thereof as described in the JP-A-55-28190.
In the former method, a memory access is provisionally executed before the content of the internal register or the main memory is changed, and after it is confirmed that the page fault does not take place, the content of the internal register or the main memory is changed. In this case, even if a page fault occurs at the provisional execution, since the content of the internal register or the main memory has not been changed, the reexecution can be achieved from the beginning of the instruction and hence the internal information need not be saved. However, the method in which an actual execution is effected after all necessary pages are confirmed to exist in the main memory requires an increase of the amount of hardware due to an addition of a special, sequential control circuit dedicated to the provisional execution or leads to a reduction of the processing speed due to an insertion of the processing step to perform the provisional execution. The provisional execution is quite difficult in a case of an instruction for processing a character string or a list where a great number of memory accesses are required and the result cannot be predicted.
In the latter method, namely, the retry method, the information items indicating the interruption point of the instruction such as the contents of the microprogram counter and the microprogram counter stack are saved during the execution of the instruction, so that at an occurrence of a page fault thereafter, the restart can be accomplished beginning from the interruption point. However, this method leads to an increase of hardware dedicated to the processing to save the information items or to a reduction of the processing speed due to an insertion of the processing steps to save the information items. Assuming the microprogram counter to be of the 14-bit configuration, the increase of the hardware dedicated to the save processing is about 14 bits.times.(4 FF gates+1 selector gate).times.9=630 gates. The influence of the hardware increase is considerable in a circuit, for example, an ECL circuit in which the degree of integration cannot be easily increased.